package com.code;

public enum CncCode {

    //获取刀具信息 获取刀具数组 数组分组
    DB_SERVICE_GET_CNCTOOLSINFO(10011,"<record><req>yes</req><sub>tool</sub><pos>+ \"(65536+1) \"+ \"</pos></record>\"")

//    feed（进给）
    /**
     * 应答说明：
     * F倍率字段<over>100</over>，单位为 1%
     * F0 倍率字段<overf0>100</overf0>，单位为 1%
     * F实际值字段<act>00000</act>
     * F0 实际值字段<actf0>00000</actf0>
     * 单位字段<unit>mm/min</unit>，mm/min或 mm/rev
     */

    /**
     * main获取返回的数据:
     * <feed>
     *     <auto>yes</auto>
     *     <time>100</time>
     *     <bar>0</bar>
     *     <over>100</over>
     *     <overf0>100</overf0>
     *     <preset>0</preset>
     *     <act>00000</act>
     *     <actf0>00000</actf0>
     *     <max>0</max>
     *     <unit>mm/min</unit>
     * </feed>
     */

    /*动态数据获取报文请求*/
    /*机床运行状态*/
    ,DB_SERVICE_GET_CNC_STATE(10001,"<ncda><req>yes</req><auto>no</auto><st>nc1</st><time>100</time><var>prg,ncstate,mode,proctimestart,proctimeproc,remaindertime</var></ncda>")

    ,DB_SERVICE_GET_CNC_MODE(10002,"<ncda><req>yes</req><auto>yes</auto><st>nc1</st><time>100</time><var>mode</var></ncda")
//    NCDA
    ,DB_SERVICE_GET_CNC__NCDA_MODE(10002,"<ncda><req>yes</req><auto>yes</auto><st>nc1</st><time>100</time><var>mode</var></ncda")



    /*机床进给*/
    ,DB_SERVICE_GET_CNC_FEED(10012,"<feed><req>yes</req><auto>yes</auto><st>nc1</st><time>100</time></feed>")

    //主轴
    ,DB_SERVICE_GET_CNC_SPINDLE(20100,"<spindle><req>yes</req><auto>yes</auto><st>nc1</st><time>500</time><nmb>1<nmb></spindle>")

    //报警信息
    /*<alarm><req>yes</req><auto>yes</auto><st>nc1</st><time>100</time></alarm>*/
    ,DB_SERVICE_GET_CNC_ALARM(30000,"<alarm><req>yes</req><auto>yes</auto><st>nc1</st><time>100</time></alarm>\n")

    //机床所有轴信息
    /*<names><req>yes</req><st>nc1</st></names>*/
    ,DB_SERVICE_GET_CNC_AXIS_NAME(30001,"<names><req>yes</req><st>nc1</st></names>")
    /* offset 程序坐标 [默认]*/
    ,DB_SERVICE_GET_CNC_AXIS_NAME_OFFSET(30002,"<axes><req>yes</req><auto>no</auto><sub>offset</sub></axes>")
   /*pos 机床坐标*/
    ,DB_SERVICE_GET_CNC_AXIS_NAME_POS(30003,"<axes><req>yes</req><auto>no</auto><sub>pos</sub></axes>")
   /*rem 剩余路径*/
    ,DB_SERVICE_GET_CNC_AXIS_NAME_REM(30004,"<axes><req>yes</req><auto>no</auto><sub>rem</sub></axes>")

    /*加工件数*/
    ,DB_SERVICE_GET_CNC_PRODUCT_COUNT(30005,"<counter><sub>get</sub><auto>yes</auto></counter>")



    /*机床刀具*/
    ,DB_SERVICE_GET_CNC_TOOLS(40000,"<record><req>yes</req><sub>tool</sub><pos>1</pos></record>")

    /*当前NC*/
    ,DB_SERVICE_GET_CNC_NCCODE(50000,"<blocks><req>yes</req></blocks>")


//    /*机床内核参数*/
//    ,DB_SERVICE_GET_CNC_VARIABLES(50000,"<variables><req>yes</req><st>nc1</st><req>yes</req><auto>yes</auto><sub>sample</sub><time>100</time><var1>X_24</var1><period1>0</period1><var2>Y_24</var2><period2>0</period2></variables>")



    //RPC层调用错误码
    ,DB_SERVICE_OK(20100,"服务正常")
    ,DB_SERVICE_DBDAO_ERROR(20104,"返回数据库的具体异常信息")

    ,DB_SERVICE_SPEAKER_NOT_EXISTED(20108,"数据库中没有要查询的speaker")
    ,DB_SERVICE_SPEAKER_HAVE_NOT_VP(20109,"speaker中没有对应的voiceprint")

    ,DB_SERVICE_UNKNOWN_ERROR(20101,"未知异常")
    ,DB_SERVICE_AGENT_ERROR	(20102,	"DBServiceAgent异常")
    ,DB_SERVICE_NETWORK_ERROR (20103,"网络异常")

    ,DB_SERVICE_INVALID_FUNCTION(20105,	"方法名不存在")
    ,DB_SERVICE_INVALID_PARAMETER(20106,"方法参数错误")

    ,DB_SERVICE_FUNCTION_NO_ACCESS(20107,"对此方法无访问权限");
    private String msg;
    private int code;

    private CncCode(int code, String msg)
    {
        this.code=code;
        this.msg=msg;
    }

    public String getMsg()
    {
        return this.msg;
    }
    public int getCode() {
        return this.code;
    }

}
